/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package fisica;

import hibernate.Sesion;
import hibernate.objeto.BalanceHidroelectrolitico;
import org.hibernate.Query;

/**
 *
 * @author Gonzalo
 */
public class BalanceHidroelectroliticoFisica extends CapaFisica {

    /**
     * Retorna el objeto BalanceHidroelectrolitico según el id.
     *
     * @param idBalanceHidroelectrolitico
     * El id del BalanceHidroelectrolitico
     * @return El objeto BalanceHidroelectrolitico consultado, null si no existe
     */
    public static BalanceHidroelectrolitico getBalanceHidroelectroliticoPorId(
            int idBalanceHidroelectrolitico) {
        Query q = Sesion.sesion.createQuery(
                "from BalanceHidroelectrolitico "
                + "where idBalanceHidroelectrolitico = "
                + idBalanceHidroelectrolitico
                );

        return (BalanceHidroelectrolitico) getObjeto(q);
    }
}
